package com.dyna.exception;//package com.dyna.exception;
//
//import com.dyna.api.response.IResultCode;
//import com.dyna.api.response.R;
//import com.dyna.api.response.ResultCode;
//import com.dyna.core.exception.CustomException;
//import com.dyna.core.exception.GlobalException;
//import com.dyna.utils.EsUtil;
//import org.springframework.context.ApplicationEventPublisher;
//import org.springframework.web.bind.MethodArgumentNotValidException;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.RestControllerAdvice;
//
///**
// * @author zhoucaiwang
// * @date 2024/1/10
// */
////@RestControllerAdvice
//public class DigitGlobalException extends GlobalException {
//
//    private ApplicationEventPublisher applicationEventPublisher;
//    // 使用spring事件驱动将错误信息保存到es中
//
//    @ExceptionHandler(MethodArgumentNotValidException.class)
//    public void digitPropertyNotFoundException(MethodArgumentNotValidException e) {
//        super.propertyNotFoundException(e);
//    }
//
//    @ExceptionHandler(CustomException.class)
//    public void digitCustomException(CustomException e) {
//        super.customException(e);
//    }
//
//    @ExceptionHandler(IllegalArgumentException.class)
//    public void digitIllegalArgException(IllegalArgumentException e) {
//        super.illegalArgException(e);
//    }
//
//}
